xmlunit-core : Org.XmlUnit.Builder Namespace

IDifferenceEngineConfigurer<D> Generic Interface

Subset of the configuration options available for a DifferenceEngine.

Syntax

public interface IDifferenceEngineConfigurer<D>
where D : Org.XmlUnit.Builder.IDifferenceEngineConfigurer<D>

Type Parameters

D
Documentation for this section has not yet been entered.

Remarks

since XMLUnit 2.5.1

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

Members

Public Methods

WithAttributeFilter (Predicate<System.Xml.XmlAttribute>) : D
Registers a filter for attributes.
WithComparisonController (Org.XmlUnit.Diff.ComparisonController) : D
Replace the {@link ComparisonControllers#Default} with your own ComparisonController.
WithComparisonFormatter (Org.XmlUnit.Diff.IComparisonFormatter) : D
Sets a non-default formatter for the differences found.
WithComparisonListeners (params Org.XmlUnit.Diff.ComparisonListener[]) : D
Registers listeners that are notified of each comparison.
WithDifferenceEvaluator (Org.XmlUnit.Diff.DifferenceEvaluator) : D
Provide your own custom {@link DifferenceEvaluator} implementation.
WithDifferenceListeners (params Org.XmlUnit.Diff.ComparisonListener[]) : D
Registers listeners that are notified of each comparison with outcome other than ComparisonResult#EQUAL.
WithNamespaceContext (IDictionary<string, string>) : D
Establish a namespace context mapping from URI to prefix that will be used in Comparison.Detail.XPath.
WithNodeFilter (Predicate<System.Xml.XmlNode>) : D
Registers a filter for nodes.
WithNodeMatcher (Org.XmlUnit.Diff.INodeMatcher) : D
Sets the strategy for selecting nodes to compare.

Extension Methods

static
Singleton<T> (this T) : IEnumerable<T>
An enumerable containing a single element.

Member Details

WithAttributeFilter Method

Registers a filter for attributes.

Syntax

public D WithAttributeFilter (Predicate<System.Xml.XmlAttribute> attributeFilter)

Parameters

attributeFilter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Only attributes for which the predicate returns true are part of the comparison. By default all attributes are considered.

The "special" namespace, namespace-location and schema-instance-type attributes can not be ignored this way. If you want to suppress comparison of them you'll need to implement Org.XmlUnit.Diff.DifferenceEvaluator

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithComparisonController Method

Replace the {@link ComparisonControllers#Default} with your own ComparisonController.

Syntax

public D WithComparisonController (Org.XmlUnit.Diff.ComparisonController comparisonController)

Parameters

comparisonController
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithComparisonFormatter Method

Sets a non-default formatter for the differences found.

Syntax

public D WithComparisonFormatter (Org.XmlUnit.Diff.IComparisonFormatter formatter)

Parameters

formatter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithComparisonListeners Method

Registers listeners that are notified of each comparison.

Syntax

public D WithComparisonListeners (params Org.XmlUnit.Diff.ComparisonListener[] comparisonListeners)

Parameters

comparisonListeners
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithDifferenceEvaluator Method

Provide your own custom {@link DifferenceEvaluator} implementation.

Syntax

public D WithDifferenceEvaluator (Org.XmlUnit.Diff.DifferenceEvaluator differenceEvaluator)

Parameters

differenceEvaluator
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

This overwrites the Default DifferenceEvaluator.

If you want use your custom DifferenceEvaluator in combination with the default or another DifferenceEvaluator you should use DifferenceEvaluators#Chain() or DifferenceEvaluators#First() to combine them:

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithDifferenceListeners Method

Registers listeners that are notified of each comparison with outcome other than ComparisonResult#EQUAL.

Syntax

public D WithDifferenceListeners (params Org.XmlUnit.Diff.ComparisonListener[] comparisonListeners)

Parameters

comparisonListeners
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithNamespaceContext Method

Establish a namespace context mapping from URI to prefix that will be used in Comparison.Detail.XPath.

Syntax

public D WithNamespaceContext (IDictionary<string, string> prefix2Uri)

Parameters

prefix2Uri
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithNodeFilter Method

Registers a filter for nodes.

Syntax

public D WithNodeFilter (Predicate<System.Xml.XmlNode> nodeFilter)

Parameters

nodeFilter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Only nodes for which the predicate returns true are part of the comparison. By default nodes that are neither document types nor XML declarations are considered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

WithNodeMatcher Method

Sets the strategy for selecting nodes to compare.

Syntax

public D WithNodeMatcher (Org.XmlUnit.Diff.INodeMatcher nodeMatcher)

Parameters

nodeMatcher
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Example with org.xmlunit.diff.DefaultNodeMatcher: .WithNodeMatcher(new DefaultNodeMatcher(ElementSelectors.ByNameAndText))

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121